package jeye.client.thread;

import java.util.Vector;

import jeye.client.exception.HttpServiceException;
import jeye.client.util.HttpClientConnector;

public class EventsLoaderThread extends HttpClientThread {
	
	private ThreadListener threadListener;
	
	private Vector eventIds;
	
	public EventsLoaderThread(HttpClientConnector connector, ThreadListener threadListener) {
		super(connector);
		this.threadListener = threadListener;
	}
	
	public void run() {
		try {
			eventIds = getServiceClient().getEvents();
		} catch (HttpServiceException e) {
			threadListener.onThreadException(e);
		}
		threadListener.onThreadEnd();
	}

	public Vector getEventIds() {
		return eventIds;
	}

}
